Isomorphism concerning tensor product While reading algebraic number theory, I came across the following fact which I don't know how to prove.

Let $A$ be an integral domain with field of fraction $K$ and $ L/K$ is a finite separable extension.  And let  $B$ be the integral closure of $A$ in $L$. Then we  have $$B \otimes_A K=L$$

I think this fact shoud be a theorem ( or follows from a theorem ) in a standard text, which i fail to find. Can you  give me a detailed proof or provide a reference. What i also want to know is whether any conditions (like separable, finite and so on) above are not needed in order to make $B \otimes_A K=L$ holds. Thanks very much!!
 A: The main point, other than the basic properties of tensor product, is that $L = KB =\{ \sum_i k_i b_i \mid k_i \in K, b_i \in B \} = \{b/a \mid b \in B, a \in A \}$. This is a consequence of the basic fact that if $y \in L$ then there is some $a \in A$ with $ay$ integral over $A$, i.e. $ay \in B$. It is the right-most characterization of $L$ that will be most useful in your problem. In particular, $L/K$ need only be an algebraic extension (so finiteness can be generalized and separability can be dropped).
There is an obvious canonical map $f: B \otimes_A K \to L$ by $b \otimes x \mapsto bx$ and this is surjective. One constructs the inverse map $g: L \to B \otimes_A K$ by sending $x \mapsto b \otimes 1/a$ for any representation $x = b/a$ with $b \in B$ and $a \in A$. It's easy to check that this is well-defined: If $b/a = b'/a'$ with $b,b' \in B$ and $a,a' \in A$ then $a'b = b'a$, so $b \otimes 1/a = \frac{ba'}{a'} \otimes \frac{a'}{a'a} = ba' \otimes \frac{1}{a'a} = b'a \otimes \frac{1}{a'a} = b' \otimes \frac{1}{a'}$ in $B \otimes_A K$. 
It's also easy to check that this is indeed the inverse. $f \circ g(b/a) = f(b \otimes 1/a) = b/a$, and for $x = a/a' \in K$ and $b \in B$ we have $g \circ f(b \otimes x) = g(bx) = g(\frac{ba}{a'}) = ba \otimes \frac{1}{a'} = b \otimes \frac{a}{a'} = b \otimes x$. 
